

cc.Class({
    extends: cc.Component,

    properties: {
        playerNode: {
            default: null,
            type: cc.Node,
        }
    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start () {
        this.playerPosition = this.playerNode.position;
    },

    // update (dt) {},

    lateUpdate (dt) {
        this.playerPosition = this.playerNode.position;
        this.node.setPosition(this.playerPosition);
    },
});
